package com.ruoyi.yljf.domain;

import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BasePlusEntity;

import java.io.Serializable;

/**
 * 活动绑定信息表对象 yljf_active_other
 * 
 * @author metaee
 * @date 2025-02-13
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "yljf_active_other")
public class ActiveOther implements Serializable {
    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /** 主键id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 活动id */
    @Excel(name = "活动id")
    private Long activeId;

    /** 绑定的id */
    @Excel(name = "绑定的id")
    private Long otherId;

    /** (user | course | book | paper ) */
    @Excel(name = "(user | course | book | paper )")
    private String type;

    /** 绑定的信息（针对需要模糊搜索的表去填充，article需要针对标题模糊搜索，所以这个地方存储article的标题） */
    //TODO  在管理后台新增article表的時候如果是article，需要把标题带上去，修改的时候如果修改了article表的title字段
    private String otherName;

    public ActiveOther(Long activeId, Long otherId, String type,String searchText) {
        this.activeId = activeId;
        this.otherId = otherId;
        this.type = type;
        this.otherName = searchText;

    }

}
